﻿using System;
using System.Collections.Generic;
using NUnit.Framework;
using Xenta.Utils;

namespace Xenta.Tests.Utils
{
    public class ExtensionsTests : TestSkeleton
    {
        #region Extensions.IEnumerable

        [Test]
        public void Can_Shuffle_Sequence()
        {
            var lst = new List<Int32>
            {
                0,1,2,3,4,5,6,7,8,9
            };
            var ret = lst.Shuffle();
            int n = 0;
            int cnt = 0;
            foreach(var i in ret)
            {
                if(i != lst[n])
                    cnt++;
                n++;
            }
            cnt.Greater(lst.Count / 2);
        }

        #endregion
    }
}
